<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="${package}.mapper.${className}Mapper">
    <#if columns??>
        <resultMap id="BaseResultMap" type="${package}.entity.${className}">
            <#list columns as column>
                <#if column.columnKey = 'PRI'>
                    <id column="${column.columnName}" property="${column.changeColumnName}"/>
                </#if>
                <#if column.columnKey != 'PRI'>
                    <result column="${column.columnName}" property="${column.changeColumnName}"/>
                </#if>
            </#list>
        </resultMap>

        <sql id="Base_Column_List">
            <#list columns as column>${column.columnName}<#if column_has_next>, </#if></#list>
        </sql>
    </#if>


</mapper>
